/// <reference path="../../Libraries/Scripts/jasmine/jasmine.js" />
/// <reference path="../../Libraries/Scripts/MicrosoftAjax.js" />
/// <reference path="../../PowerShell/Scripts/Dev4U.Core.js" />
/// <reference path="../../PowerShell/Scripts/Dev4U.SP.PowerShell.Interpreter.js" />
/// <reference path="../../PowerShell/Scripts/Dev4U.SP.PowerShell.Interpreter.Driver.js" />
/// <reference path="../../PowerShell/Scripts/Dev4U.SP.PowerShell.Interpreter.Grammar.js" />
/// <reference path="../../PowerShell/Scripts/jscc.js" />

(function () {
    describe('run', function () {
        it('Get-Help', function () {
            var output = { write: function () { } };
            spyOn(output, 'write');

            var interpreter = Dev4U.SP.PowerShell.Interpreter.getInstance();
            interpreter.setOutputWriter(output.write);
            interpreter.run('Get-Help');

            expect(output.write).toHaveBeenCalledWith('Get-SPSite');
        });
    });
})();